// 菜单、路由信息，由 mock\api\auth /admin/api/menu.item.current.listing 在登录时调用并统一注入
// 系统资源配置，同时作为 demo 路由和菜单的数据源
// menuItemCnName 为空 component 不为空的需要配置路由，表示二级页面，不在菜单中显示
// component 为空的表示虚拟菜单，不会处理为 routers
// component 默认会补充 pages 做为根目录，配置时从 pages 内目录开始配置
// component 必须唯一，同时会作为 routers 的 name
// uri 可以不配置上级 url，因为 router 中是按照嵌套路由方式处理的，vue 前端 url
// 数据是扁平的，用 menuItemId、parentId 决定父子关系

export default [
  {
    menuItemId: "1",
    parentId: "0",
    resourceId: "",
    // 菜单名
    menuItemCnName: "基础知识",
    menuItemEnName: "基础知识",
    // 对应 router 中的 path，同时作为 name
    uri: "/demo",
    // 对应 router 中的 component；对应 pages 下的文件夹
    component: "layout/index.vue",
    redirect: "/demo/index",
    icon: "CoffeeCup",
    // 是否在左侧菜单显示 1显示 0隐藏
    visible: 1,
    hasChildren: 1,
  },
  {
    menuItemId: "10",
    parentId: "1",
    resourceId: "",
    menuItemCnName: "demo all",
    menuItemEnName: "demo all",
    uri: "/demo/index",
    component: "demo/demo-router/home/index.vue",
    icon: "",
  },
  {
    menuItemId: "401",
    parentId: "1",
    resourceId: "",
    menuItemCnName: "webview file",
    menuItemEnName: "webview file",
    uri: "/demo/webview-file",
    component: "demo/demo-webview/file.vue",
    icon: "",
  },
  {
    menuItemId: "402",
    parentId: "1",
    resourceId: "",
    menuItemCnName: "webview db",
    menuItemEnName: "webview db",
    uri: "/demo/db",
    component: "demo/demo-webview/db.vue",
    icon: "",
  },
  {
    menuItemId: "403",
    parentId: "1",
    resourceId: "",
    menuItemCnName: "baidu map",
    menuItemEnName: "baidu map",
    uri: "/demo/baidu-map",
    component: "demo/demo-baidu-map/index.vue",
    icon: "",
  },
  {
    menuItemId: "404",
    parentId: "1",
    resourceId: "",
    menuItemCnName: "upload",
    menuItemEnName: "upload",
    uri: "/demo/upload",
    component: "demo/demo-upload/list.vue",
    icon: "",
  },
  {
    menuItemId: "11",
    parentId: "1",
    resourceId: "",
    menuItemCnName: "props",
    menuItemEnName: "props",
    uri: "/demo/props",
    component: "demo/demo-props/index.vue",
    icon: "",
  },
  {
    menuItemId: "13",
    parentId: "1",
    menuItemCnName: "emits",
    menuItemEnName: "emits",
    resourceId: "",
    uri: "/demo/emits",
    component: "demo/demo-emits/index.vue",
    icon: "",
  },
  {
    menuItemId: "15",
    parentId: "1",
    menuItemCnName: "watch、ref",
    menuItemEnName: "watch、ref",
    resourceId: "",
    uri: "/demo/watch",
    component: "demo/demo-watch-ref/index.vue",
    icon: "",
  },
  {
    menuItemId: "17",
    parentId: "1",
    resourceId: "",
    menuItemCnName: "expose",
    menuItemEnName: "expose",
    uri: "/demo/expose",
    component: "demo/demo-expose/index.vue",
  },
  {
    menuItemId: "19",
    parentId: "1",
    menuItemCnName: "store",
    menuItemEnName: "store",
    resourceId: "",
    uri: "/demo/store",
    component: "demo/demo-store/index.vue",
  },
  {
    menuItemId: "111",
    parentId: "1",
    menuItemCnName: "env",
    menuItemEnName: "env",
    resourceId: "",
    uri: "/demo/env",
    component: "demo/demo-env/index.vue",
  },
  {
    menuItemId: "113",
    parentId: "1",
    menuItemCnName: "svg、icon",
    menuItemEnName: "svg、icon",
    resourceId: "",
    uri: "/demo/svg",
    component: "demo/demo-svg/index.vue",
    icon: "",
  },
  {
    menuItemId: "115",
    parentId: "1",
    resourceId: "",
    menuItemCnName: "axios、mock",
    menuItemEnName: "axios、mock",
    uri: "/demo/axios",
    component: "demo/demo-axios/index.vue",
  },
  {
    menuItemId: "117",
    parentId: "1",
    resourceId: "",
    menuItemCnName: "slot",
    menuItemEnName: "slot",
    uri: "/demo/slot",
    component: "demo/demo-slot/index.vue",
    icon: "",
  },
  {
    menuItemId: "119",
    parentId: "1",
    resourceId: "",
    menuItemCnName: "router",
    menuItemEnName: "router",
    menuItemClass: "",
    uri: "/demo/router",
    component: "demo/demo-router/layout/index.vue",
    icon: "",
    hasChildren: 1,
  },
  {
    menuItemId: "119001",
    parentId: "119",
    resourceId: "",
    menuItemCnName: "",
    menuItemEnName: "",
    uri: "/demo/tab404",
    component: "layout/components/404.vue",
    icon: "",
    visible: 0,
    hasChildren: 0,
  },
  {
    menuItemId: "1190013",
    parentId: "119",
    resourceId: "",
    menuItemCnName: "",
    menuItemEnName: "",
    // url 层级不影响加载 component
    uri: "/demo/tab/500",
    component: "layout/components/500.vue",
    icon: "",
    visible: 0,
    hasChildren: 0,
  },
  {
    menuItemId: "1190015",
    parentId: "119",
    resourceId: "",
    menuItemCnName: "",
    menuItemEnName: "",
    uri: "/demo/home",
    component: "demo/demo-router/home/index.vue",
    icon: "",
    visible: 0,
    hasChildren: 0,
  },
  {
    menuItemId: "1190017",
    parentId: "119",
    resourceId: "",
    menuItemCnName: "",
    menuItemEnName: "",
    uri: "/demo/about",
    component: "demo/demo-router/about/index.vue",
    icon: "",
    visible: 0,
    hasChildren: 0,
  },
  {
    menuItemId: "1251",
    parentId: "1",
    resourceId: "",
    menuItemCnName: "echarts",
    menuItemEnName: "echarts",
    uri: "/demo/echarts",
    component: "demo/demo-echarts/index.vue",
    icon: "",
  },
  {
    menuItemId: "121",
    parentId: "1",
    resourceId: "",
    menuItemCnName: "el table",
    menuItemEnName: "el table",
    uri: "/demo/table",
    component: "demo/demo-element-table/index.vue",
    icon: "",
  },
  {
    menuItemId: "123",
    parentId: "1",
    resourceId: "",
    menuItemCnName: "el data grid",
    menuItemEnName: "el data grid",
    uri: "/demo/datagrid",
    component: "demo/demo-datagrid/index.vue",
    icon: "",
  },
];
